package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketRegion;
import com.cskaoyan.bean.MarketRegionExample;
import com.cskaoyan.bean.vo.region.AdminRegionChildrenChildrenVO;
import com.cskaoyan.bean.vo.region.AdminRegionChildrenVO;
import com.cskaoyan.bean.vo.region.AdminRegionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketRegionMapper {
    long countByExample(MarketRegionExample example);

    int deleteByExample(MarketRegionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketRegion record);

    int insertSelective(MarketRegion record);

    List<MarketRegion> selectByExample(MarketRegionExample example);

    MarketRegion selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketRegion record, @Param("example") MarketRegionExample example);

    int updateByExample(@Param("record") MarketRegion record, @Param("example") MarketRegionExample example);

    int updateByPrimaryKeySelective(MarketRegion record);

    int updateByPrimaryKey(MarketRegion record);

    //获取到省份的信息
    List<AdminRegionVO> selectAllPrinceInfo(Integer pid);

    //获取省份对应的区的id
    List<AdminRegionChildrenVO> selectCityById(Integer PrinceId);

    //获取对应县区的信息
    List<AdminRegionChildrenChildrenVO> selectZoneByCityPid(Integer cityPid);

    //获得所有的省
    List<AdminRegionVO> selectAllInfo(Integer type);

    //获得所有的市
    List<AdminRegionChildrenVO> selectAllCity(Integer type);

    //获得所有的县
    List<AdminRegionChildrenChildrenVO> selectAllZone(Integer type);
}